Optimal. Leaf size=95 \[ -\frac{d \cos \left (c-\frac{d e}{f}\right ) \text{CosIntegral}\left (\frac{d e}{f}+d x\right )}{a f^2}+\frac{d \sin \left (c-\frac{d e}{f}\right ) \text{Si}\left (\frac{d e}{f}+d x\right )}{a f^2}+\frac{\sin (c+d x)}{a f (e+f x)}-\frac{1}{a f (e+f x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.200108, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {4523, 32, 3297, 3303, 3299, 3302} \[ -\frac{d \cos \left (c-\frac{d e}{f}\right ) \text{CosIntegral}\left (\frac{d e}{f}+d x\right )}{a f^2}+\frac{d \sin \left (c-\frac{d e}{f}\right ) \text{Si}\left (\frac{d e}{f}+d x\right )}{a f^2}+\frac{\sin (c+d x)}{a f (e+f x)}-\frac{1}{a f (e+f x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4523
Rule 32
Rule 3297
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \frac{\cos ^2(c+d x)}{(e+f x)^2 (a+a \sin (c+d x))} \, dx &=\frac{\int \frac{1}{(e+f x)^2} \, dx}{a}-\frac{\int \frac{\sin (c+d x)}{(e+f x)^2} \, dx}{a}\\ &=-\frac{1}{a f (e+f x)}+\frac{\sin (c+d x)}{a f (e+f x)}-\frac{d \int \frac{\cos (c+d x)}{e+f x} \, dx}{a f}\\ &=-\frac{1}{a f (e+f x)}+\frac{\sin (c+d x)}{a f (e+f x)}-\frac{\left (d \cos \left (c-\frac{d e}{f}\right )\right ) \int \frac{\cos \left (\frac{d e}{f}+d x\right )}{e+f x} \, dx}{a f}+\frac{\left (d \sin \left (c-\frac{d e}{f}\right )\right ) \int \frac{\sin \left (\frac{d e}{f}+d x\right )}{e+f x} \, dx}{a f}\\ &=-\frac{1}{a f (e+f x)}-\frac{d \cos \left (c-\frac{d e}{f}\right ) \text{Ci}\left (\frac{d e}{f}+d x\right )}{a f^2}+\frac{\sin (c+d x)}{a f (e+f x)}+\frac{d \sin \left (c-\frac{d e}{f}\right ) \text{Si}\left (\frac{d e}{f}+d x\right )}{a f^2}\\ \end{align*}
Mathematica [A] time = 0.415589, size = 80, normalized size = 0.84 \[ \frac{-d (e+f x) \cos \left (c-\frac{d e}{f}\right ) \text{CosIntegral}\left (d \left (\frac{e}{f}+x\right )\right )+d (e+f x) \sin \left (c-\frac{d e}{f}\right ) \text{Si}\left (d \left (\frac{e}{f}+x\right )\right )+f (\sin (c+d x)-1)}{a f^2 (e+f x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.053, size = 132, normalized size = 1.4 \begin{align*}{\frac{d}{a} \left ({\frac{\sin \left ( dx+c \right ) }{ \left ( \left ( dx+c \right ) f-cf+de \right ) f}}-{\frac{1}{f} \left ({\frac{1}{f}{\it Si} \left ( dx+c+{\frac{-cf+de}{f}} \right ) \sin \left ({\frac{-cf+de}{f}} \right ) }+{\frac{1}{f}{\it Ci} \left ( dx+c+{\frac{-cf+de}{f}} \right ) \cos \left ({\frac{-cf+de}{f}} \right ) } \right ) }-{\frac{1}{ \left ( \left ( dx+c \right ) f-cf+de \right ) f}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.41665, size = 232, normalized size = 2.44 \begin{align*} \frac{d^{2}{\left (i \, E_{2}\left (\frac{i \, d e + i \,{\left (d x + c\right )} f - i \, c f}{f}\right ) - i \, E_{2}\left (-\frac{i \, d e + i \,{\left (d x + c\right )} f - i \, c f}{f}\right )\right )} \cos \left (-\frac{d e - c f}{f}\right ) + d^{2}{\left (E_{2}\left (\frac{i \, d e + i \,{\left (d x + c\right )} f - i \, c f}{f}\right ) + E_{2}\left (-\frac{i \, d e + i \,{\left (d x + c\right )} f - i \, c f}{f}\right )\right )} \sin \left (-\frac{d e - c f}{f}\right ) - 2 \, d^{2}}{2 \,{\left (a d e f +{\left (d x + c\right )} a f^{2} - a c f^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.61146, size = 315, normalized size = 3.32 \begin{align*} \frac{2 \,{\left (d f x + d e\right )} \sin \left (-\frac{d e - c f}{f}\right ) \operatorname{Si}\left (\frac{d f x + d e}{f}\right ) -{\left ({\left (d f x + d e\right )} \operatorname{Ci}\left (\frac{d f x + d e}{f}\right ) +{\left (d f x + d e\right )} \operatorname{Ci}\left (-\frac{d f x + d e}{f}\right )\right )} \cos \left (-\frac{d e - c f}{f}\right ) + 2 \, f \sin \left (d x + c\right ) - 2 \, f}{2 \,{\left (a f^{3} x + a e f^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (d x + c\right )^{2}}{{\left (f x + e\right )}^{2}{\left (a \sin \left (d x + c\right ) + a\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]